﻿using DataStandard;
using DataStandard.ProtocoType;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test
{
    [TestClass]
    public class UnitTest2
    {
        [TestMethod]
        public void TestProtocoItem()
        {
            ProtocolItem protocolItem = new ProtocolItem();

            protocolItem.Name = "测试ProtocolItem";
            protocolItem.InterfaceType = new ModbusQi(new JieKou.Modbus.ParameterTCP() { ModbusName ="123",RemoteIP="127.0.0.1",RemotePort=502,Functioncode=3});

            var t1 = protocolItem.InterfaceType.GetType();

            protocolItem.Run();


            var t2 = protocolItem.InterfaceType.IsRun;


        }

        [TestMethod]
        public void TestQiModbus()
        {
            var t1 = new ModbusQi(new JieKou.Modbus.ParameterRTU() { ModbusName="RTU",SerialPortName="COM1"});

            var t2 = t1.IsRun;

        }

        [TestMethod]
        public void TestBytes()
        {
            byte[] t1 = { 1, 2, 3 };
            byte[] t2 = { 4, 5, 6 };

            byte[] t3 = { 7, 8, 9 };
            byte[] t4 = { 10, 11, 12 };

            t1 = t2;
            t2 = t3;
            t3 = t4;
        }
    }
}
